package com.ywgt.service;

import com.github.pagehelper.Page;
import com.ywgt.pojo.Goods;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ywgt.pojo.GoodsAllinone;

import java.util.List;

/**
 * <p>
 * 商品基本信息表 服务类
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
public interface GoodsService extends IService<Goods> {

    Object catAndBrand();

    Page<Goods> getGoods(String name, String goodsSn, int page, int limit, String sort, String order);

    Object create(GoodsAllinone goodsAllinone);

    Object updateGoods(GoodsAllinone goodsAllinone);

    Object detail(Integer id);

    List<Goods> getNewGoods(int i, Integer newLimit);

    List<Goods> getHotGoods(int i,Integer hotLimit);

    List<Goods> getByCategorys(List<Integer> ids, int i, Integer catlogListLimit);


    Page<Goods> getGoodsByCondition(Integer categoryId, Integer brandId, String keyword, Boolean isHot, Boolean isNew, Integer page, Integer size, String sort, String order);

    List<Integer> getCategoryIds(Integer brandId, String keyword, Boolean isHot, Boolean isNew);

    void incrBrowser(Integer id);
}
